module.exports = {
	//1. 获取单个dom节点
	get(s) {
		return document.querySelector(s);
	},
	// 获取多个dom节点
	getAll(s) {
		return document.querySelectorAll(s);
	},

	// 2.底部导航栏
	tabBar(name) {
		let html = `
        <a href="./index.html" class="${name === "index" ? "active" : ""}">
			<span class="iconfont icon-shouye"></span>
			首页
		</a>
		<a href="./sports_run.html" class="${name === "sports_run" ? "active" : ""}">
			<span class="iconfont icon-xindiantu"></span>
			运动
		</a>
		<a href="./mime.html" class="${name === "mime" ? "active" : ""}">
			<span class="iconfont icon-wode"></span>
			我的
		</a>
    	`;
		this.get("#tabBar").innerHTML = html;
	},
	//头部导航
	navbar(sprots) {
		let html = `
		<a href="sports_run.html" class="${
			sprots === "sports_run" ? "active" : ""
		}">跑步</a>
		<a href="sports_cycling.html"class="${
			sprots === "sports_cycling" ? "active" : ""
		}" >骑行</a>
		<a href="sports_drill.html"  class="${
			sprots === "sports_drill" ? "active" : ""
		}">课程训练</a>`;
		this.get("#main-one").innerHTML = html;
	},
};
